<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
  </head>
  <body>
    <div id="app">
      <btn-a>
        <template slot="aa"><h1>标题</h1></template>
        <template slot="bb"><section>内容</section></template>
        <template slot-scope="obj"
          ><div :style="obj.css">结尾{{obj}}</div></template
        >
      </btn-a>
    </div>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        data: {},
        methods: {},
        components: {
          "btn-a": {
            template: `<div><slot name="aa" ></slot><slot name="bb"></slot><slot :css="css"></slot></div>`,
            data() {
              return {
               css: {marginLeft: "10px",
                fontSize: "30px",}
              };
            },
          },
        },
      });
    </script>
  </body>
</html>
